/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.deployment.manager.relatorios;

import br.com.deployment.enums.TipoRelatorioLancamento;
import br.com.deployment.servico.ProtocoloServico;
import br.com.deployment.utilitario.TipoEndereco;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.model.SelectItem;

/**
 *
 * @author roniere
 */
@ManagedBean
@ViewScoped
public class ManagerRelatorioProtocolo implements Serializable{
    
    @EJB
    ProtocoloServico protocoloServico;
    
    private Date dataInicial;
    private Date dataFinal;
    private TipoRelatorioLancamento tipo;

    public void gerar(){ 
        protocoloServico.gerarRelatorioProtocoloDate(tipo, dataInicial, dataFinal);
    }
    
    public List<SelectItem> tipos() {
        List<SelectItem> items = new ArrayList<SelectItem>();
        for (TipoRelatorioLancamento tipo : TipoRelatorioLancamento.values()) {
                items.add(new SelectItem(tipo));
        }
        return items;
    }

    public Date getDataFinal() {
        return dataFinal;
    }

    public void setDataFinal(Date dataFinal) {
        this.dataFinal = dataFinal;
    }

    public Date getDataInicial() {
        return dataInicial;
    }

    public void setDataInicial(Date dataInicial) {
        this.dataInicial = dataInicial;
    }

    public TipoRelatorioLancamento getTipo() {
        return tipo;
    }

    public void setTipo(TipoRelatorioLancamento tipo) {
        this.tipo = tipo;
    }
    
    
            
    
}
